<include file="Public/htgg" /> 
<div class="main-content-inner">
<div id="sidebar2" class="sidebar h-sidebar navbar-collapse collapse collapse_btn" data-sidebar="true" data-sidebar-hover="true">
	<ul class="nav nav-list">
    
<li>
			<a href="http://localhost/index.php/Admin/Sys/admin_list.html">
				<o class="font12 rigbg">管理员列表</o>
			</a>

			<b class="arrow"></b>
		</li><li>
			<a href="http://localhost/index.php/Admin/Sys/admin_group.html">
				<o class="font12 ">用户组列表</o>
			</a>

			<b class="arrow"></b>
		</li><li>
			<a href="http://localhost/index.php/Admin/Sys/admin_rule.html">
				<o class="font12 ">权限管理</o>
			</a>

			<b class="arrow"></b>
		</li>

	</ul><!-- /.nav-list -->
</div><div class="page-content">



<div class="row maintop">
<div class="col-xs-12 col-sm-1">
<a href="{:U('guanliyuan/tjgly')}">
<button class="btn btn-xs btn-danger">
<i class="ace-icon fa fa-bolt bigger-110"></i>
	添加管理员
</button>
</a>
</div>

<div class="col-xs-12 col-sm-3">
<form name="admin_list_sea" class="form-search" method="post" action="http://localhost/index.php/Admin/Sys/admin_list">
<div class="input-group">
	<span class="input-group-addon">
		<i class="ace-icon fa fa-check"></i>
	</span>
	<input type="text" name="val" id="val" class="form-control search-query admin_sea" value="" placeholder="输入需查询的用户名">
	<span class="input-group-btn">
		<button type="submit" class="btn btn-xs  btn-purple">
			<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
			搜索
		</button>
	</span>
</div>
</form>
</div>
<div class="input-group-btn">
<a href="http://localhost/index.php/Admin/Sys/admin_list">
<button type="button" class="btn btn-xs  btn-purple">
<span class="ace-icon fa fa-globe icon-on-right bigger-110"></span>
显示全部
</button>
</a>
</div>


</div>



<div class="row">
<div class="col-xs-12">
	<div>
    <form id="leftnav" name="leftnav" method="post" action="">
    <input type="hidden" name="checkk" id="checkk" value="1"><!--用于判断操作类型-->
		<table width="100%" class="table table-striped table-bordered table-hover" id="dynamic-table">
			<thead>
				<tr>
				  <th width="10%">登录用户名</th>
				  <th width="10%">用户组</th>
				  <th width="15%">IP地址</th>
				  <th width="15%">IP时间</th>
				  <th width="9%">状态</th>
				  <th width="8%" style="border-right:#CCC solid 1px;">操作</th>
			  </tr>
			</thead>

			<tbody>
			<foreach name="glysj" item="v" >
                <tr>
					<td height="28">{$v.yonghuming}</td>
					<td>超级管理员</td>
					<td>{$v.dlip}</td>
					<td>{$v.dlsj|date="Y年m月d日 H:s:d",###}</td>
					<td>
					<a class="red" href="javascript:;" onclick="return stateyes(1);" title="已开启">
					<div id="zt1"><button class="btn btn-minier btn-yellow">状态开启</button></div>
					</a>
																			</td>
					<td>
						<div class="hidden-sm hidden-xs action-buttons">
							<a class="green" href="{:U('guanliyuan/xggly',array('id'=>$v[id]))}" title="修改">
								<i class="ace-icon fa fa-pencil bigger-130"></i>																</a>
							<a class="red" href="javascript:;" onclick="return del({$v.id});" title="删除">
								<i class="ace-icon fa fa-trash-o bigger-130"></i>																</a>															</div>														</td>
				</tr> 
				</foreach>
              <tr>
				  <td height="50" colspan="10" align="left"><div class="pagination"><ul><li><span> 2 条记录 1/1 页</span></li>          </ul></div></td>
			  </tr>
			</tbody>
	  </table>
      </form>
	</div>
</div>
</div>

<div class="row">
<div class="col-xs-12">
<!-- PAGE CONTENT BEGINS -->
<div class="hidden">

<!-- .sidebar -->
</div>

</div><!-- /.col -->
</div><!-- /.row -->

</div><!-- /.page-content -->
</div>
</div><!-- /.main-content -->


<script>
function del(id){
	if(id==1){
	layer.alert('超级管理员不可删除', {icon: 4});
	return false;
	}
	layer.confirm('你确定要删除吗？', {icon: 3}, function(index){
	layer.close(index);
	window.location.href="/admin.php/guanliyuan/scgly/id/"+id+".html";
	});
}

function stateyes(val){
		  $.post('/index.php/Admin/Sys/admin_list_state.html',
		  {x:val},
	function(data){
	var $v=val;
		if(data.status){
			if(data.info=='状态禁止'){
				var a='<button class="btn btn-minier btn-danger">状态禁用</button>'
				$('#zt'+val).html(a);
				return false;
			}else{
				var b='<button class="btn btn-minier btn-yellow">状态开启</button>'
				$('#zt'+val).html(b);
				return false;
			}
			
		}
	});
	return false;
}
</script>
<include file="Public/dibu" /> 